<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
      .a{
        display: inline-block;
        /* border-left: 5px solid transparent;
        border-bottom: 5px solid transparent; */
        border-right: 5px solid transparent;
        border-top: 5px solid red;
      }
    </style>
</head>
<body>
  <div class="a"></div>
  <script>
    var div =document.createElement('div');
    var p =document.createElement('p');
    div.setAttribute('c','example')
    p.setAttribute('class','solgan')
    
    
    div.appendChild(p)
    document.boby.appendChild(div)
  </script>
</body>
</html>